/**
 * 
 */
package com.newtribe.security.cert.config.impl;

import java.security.KeyStore;
import java.security.KeyStoreSpi;
import java.security.Provider;

/**
 * @author newtribe
 *
 */
public class Pkcs11KeyStore {

	
	public Pkcs11KeyStore(){

		
	}

	
	public static KeyStore getInstance(String type) throws Exception {
	
		String configName = "d:/gfa.cfg";
		Provider p = new sun.security.pkcs11.SunPKCS11(configName);
		
		String pin = "1234";//key的pin码
	    KeyStore ks = KeyStore.getInstance ("PKCS11", p);
	    return ks ;
	}

}
